<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../css/pravate/commen.css" />
		<link rel="stylesheet" href="../css/pravate/details.css" />
		<script type="text/javascript" src="../js/mui.min.js"></script>
		<script type="text/javascript" src="../js/mobile-detect.min.js"></script>
		<script type="text/javascript" src="../js/jquery-2.1.0.js"></script>
		<script type="text/javascript" src="../js/config.js"></script>
		<script type="text/javascript" src="../js/common.js"></script>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav mui-border-none border-bottom-e7e7">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">发送信息</h1>
		</header>
		<div class="mui-content">
			<div class="bg-fff">
				<div class="details">
					<div class="mui-row">
						<div class="mui-col-sm-12 mui-col-xs-12">
							订单号
							<u>*********</u>，
							<u class="BookingName"></u>您已预定
							<u class="BookingTime"></u>(备注：
							<u class="remarks"></u>)总计：￥
							<u class="price"></u>（含押金）请点击链接完成后续预授权支付
							<a href="#" style="word-break: break-word;">
								<u class="text-010">https://qr.alipay.com/**********</u>
							</a>(链接有效期10分钟)
						</div>
					</div>
				</div>
			</div>
			<div class="margin-15-10">
				<div class="get-number">
					<div class="mui-row">
						<div class="mui-col-sm-4 mui-col-xs-4 text-333 text-sm border-right-e7e7">
							收信人号码
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 mui-pull-left">
							<input class="text-sm" type="number" placeholder="请输入收信人手机号码" />
						</div>
					</div>
				</div>
			</div>
			<div class="mui-row">
				<div class="mui-col-sm-12 mui-col-xs-12 padding-0-30">
					<div class="mui-btn text-default mui-btn-block sendBtn">发送</div>
				</div>
			</div>
		</div>
		<script type="text/javascript" charset="UTF-8">
			mui.init();
			mui.plusReady(function(){
				var self = plus.webview.currentWebview();
				var data=self.data;
				$(".price").html(data.price);
				$(".BookingName").html(data.BookingName);
				$(".BookingPhone").html(data.BookingPhone);
				$(".BookingTime").html(data.BookingTime);
				$(".remarks").html(data.remarks);
				$("input").val(data.BookingPhone);
				$('input').bind('input propertychange', function() { 
				   	if($(this).val()!=""){
				   		$('.sendBtn').removeClass("btn-disable");
				   		return false;
				   	}
				   	$('.sendBtn').addClass("btn-disable");
				});
				
				mui("body").on("tap",".sendBtn",function(){
					$("input").blur();
					var ReceivePhone=$('input').val();
					var reg=/^1\d{10}$/;
					if($('.sendBtn').hasClass("btn-disable")){
						return false;
					}else if(ReceivePhone==""){
						mui.alert("请输入收信人手机号码"," ","关闭",function(){},"div");
						return false;
					}else if(!reg.test(ReceivePhone)){
						mui.alert("请输入正确的手机号码"," ","关闭",function(){},"div");
						return false;
					}
					data.ReceivePhone=ReceivePhone;
					plus.nativeUI.showWaiting("正在发送短信，请勿退出...");
					require(weburl+SmsFundAuthCreate,"json","post",data,function(response){
						plus.nativeUI.closeWaiting();
						if(response.status==="success"){
							mui.alert(response.msg," ","确定",function(){
								mui.openWindow({
									url:"details.html",
									id:"details.html",
									extras:{
										out_order_no:response.data[0].out_order_no
									}
								})
							},"div");
							return false;
						}
						mui.alert(response.msg," ","关闭",function(){},"div");
					},function(xhr){
						plus.nativeUI.closeWaiting();
						mui.alert("网络错误，请稍后再试"," ","关闭",function(){},"div");
					})
				})
			})
		</script>
	</body>

</html>